package edu.guet.builder;

/**
 * 建造者模式是在当前创建复杂对象的算法应该独立于该对象的组成部分以及他们的装配方式适用的模式
 */
public class Main {

    public static void main(String[] args) {
        Director director = new Director();

        ConcreteBuilder1 builder1 = new ConcreteBuilder1();
        ConcreteBuilder2 builder2 = new ConcreteBuilder2();

        director.Construct(builder1); //不用考虑组成部分和装配方式

        Product p1 = builder1.getResult();
        p1.show();

        director.Construct(builder2);

        Product p2 = builder2.getResult();
        p2.show();



    }
}
